#define _CRT_SECURE_NO_WARNINGS 1
#include"Queue.h"
#include"Stack.h"
#include<stdio.h>


void testQ()
{
	Queue q;
	QueueInit(&q);

	QueuePush(&q, 1); 
	printf("%d ", QueueSize(&q));
	QueuePush(&q, 2); 
	printf("%d ", QueueSize(&q));
	QueuePush(&q, 3);
	printf("%d ", QueueSize(&q));

	QueuePop(&q);
	printf("%d ", QueueSize(&q));
	QueuePop(&q);
	printf("%d ", QueueSize(&q));	
	QueuePop(&q);
	printf("%d ", QueueSize(&q));

	//while (!QueueEmpty(&q))
	//{
	//	printf("%d ",QueueFront(&q));
	//	QueuePop(&q);
	//}

	QueueDestroy(&q);
}

void testST()
{
	Stack st;
	StackInit(&st);
	StackPush(&st, 1);
	StackPush(&st, 2);
	StackPush(&st, 3);
	StackPush(&st, 4);
	while (!StackEmpty(&st))
	{
		printf("%d ", StackTop(&st));
		StackPop(&st);
	}
	StackDestroy(&st);
}

int main()
{
	testQ();
	//testST();
	return 0;
}